/**
 * @des tinymce 配置
 * @see http://tinymce.ax-z.cn/configure/editor-appearance.php#elementpath
 */
const config = () => {
  return {
    height: 300,
    menubar: false,
    // 汉化包托管在shb
    language_url : 'https://file.shb.ltd/shb-resource/js/zh_CN.js',
    language: 'zh_CN',
    branding: false,
    elementpath: false, // 隐藏左下角标签元素
    max_height:800,
    plugins:
      'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample  charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists imagetools textpattern help emoticons autosave autoresize imagetools',
    // toolbar: 'code undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | \
    // styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
    // table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | bdmap indent2em lineheight formatpainter axupimgs',
    // plugins: [
    //   'advlist autolink lists link image charmap print preview anchor imagetools',
    //   'searchreplace visualblocks code fullscreen',
    //   'insertdatetime media table paste code help wordcount',
    // ],
    draggable_modal: true,
    autosave_ask_before_unload:false,
    // body样式需要根据当前页面变动
    content_style: 'img{max-width:100%!important;height:auto;}body{font-family: Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft Yahei, Heiti SC, WenQuanYi Micro Hei, Arial, sans-serif;font-size: 14px;font-weight: 400;line-height: 1.4;color: #262626;text-align: left;padding:0 16px;box-sizing:border-box}div{max-width:100%!important;box-sizing:border-box;white-space:inherit !important;}span{white-space:inherit !important}p{white-space:inherit !important}',
    contextmenu: 'link image imagetools table spellchecker lists',
    toolbar:'fontselect fontsizeselect forecolor backcolor image media fullscreen | formatselect alignleft aligncenter alignright alignjustify outdent indent bold italic underline strikethrough link | ',
    toolbar_mode: 'sliding',
    file_picker_types: 'file image media',
    fontsize_formats: '12px 14px 16px 18px 20px 24px 26px 28px 30px 32px',
    relative_urls : false,
    convert_urls:false,
    font_formats:
      '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;'
  };
};

export default config;
